{{ define "header" }}
<div class="container header-wrapper">
  <div class="row">
    <div class="col-lg-12">
      <div class="header-content">
        <h1 class="header-title">
          {{ if .Site.Params.headerTitle }}
            {{ .Site.Params.headerTitle | safeHTML }}
          {{ else }}
            {{ .Site.Title | safeHTML }}
          {{ end }}
        </h1>
        <div class="header-underline"></div>
        {{ with .Site.Params.description }}
        <p class="header-subtitle header-subtitle-homepage">{{ . | safeHTML }}</p>
        {{ end }}
      </div>
    </div>
  </div>
</div>
{{ end }}
{{ define "main" }}
{{- $pages := .Pages -}}
{{- if .IsHome -}}
  {{- $pages = where .Site.RegularPages "Type" "posts" -}}
{{- end -}}
{{- $paginator := .Paginate $pages -}}
<div class="archive-container">
    <div class="container content archive">
      <h2>{{ i18n "latest_posts" }}{{ if $paginator.HasPrev }} <small>- {{ i18n "page" }} {{ $paginator.PageNumber }}</small>{{ end }}</h2>
        <dl class="row">
            {{ range $paginator.Pages -}}
            <dt class="col-md-3">{{ .Date.Format (.Site.Params.dateFormatToUse | default "Mon 02 January 2006") }}</dt>
            <dd class="col-md-9"><a href="{{ .Permalink }}">{{ .Title }}</a></dd>
            {{ end }}
        </dl>
    </div>
</div>
{{ partial "pagination.html" . }}
{{ end }}
